﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace JHoelsch.Gui.View.View
{
    /// <summary>
    /// Interaktionslogik für CarButton.xaml
    /// </summary>
    public partial class CarButton : UserControl
    {

        public static DependencyProperty LabelTextProperty = DependencyProperty.Register("LabelText", typeof(string), typeof(CarButton));

        public static DependencyProperty ColorProperty = DependencyProperty.Register("Color", typeof(Brush), typeof(CarButton));

        public CarButton()
        {
            InitializeComponent();
            Color = Brushes.Chocolate;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (needSaveImage.Visibility == System.Windows.Visibility.Visible)
                needSaveImage.Visibility = System.Windows.Visibility.Hidden;
            else
                needSaveImage.Visibility = System.Windows.Visibility.Visible;
        }

        public Brush Color
        {
            get
            {
                return (Brush)GetValue(ColorProperty);
            }
            set
            {
                SetValue(ColorProperty,value);
            }
        }

        public string LabelText
        {
            get
            {
                return (string)GetValue(LabelTextProperty);
            }
            set
            {
                SetValue(LabelTextProperty, value);
            }
        }  
    }
}
